#include "app_mqtt.h"
#include "log.h"
#include <unistd.h>

static int test_callback(char *payload)
{
    log_info("recv msg:%s", payload);
    return 0;
}

int main(int argc, char const *argv[])
{
    //1 初始化 
    app_mqtt_init();
    //2 注册回调
    app_mqtt_register_recv_callback(test_callback);
    //3 发送数据
    app_mqtt_publish(  "hello world!!!!!");

    sleep(100);

    app_mqtt_destroy();
    


    return 0;
}
